#pragma once

int randomBetween(int down, int up)
{
	return  (rand() % (up - down) )+ down;
}

bool isLucky(int probability)
{
	return ((rand() % probability) == 1 );
}

int random(int up)
{
	if(up == 0)
		return 0;
	return (rand() % up);
}

float randomToOne()
{
	return (rand() / ((float)(RAND_MAX + 1)));
}

float randomFloat(float down, float up)
{
	return ((rand() / ((float)(RAND_MAX + 1))) *(up - down) )+ down;
}

int random(int down, int up)
{

	return ((rand() % (up - down)) + down);
}